#ifndef MATRIZ_H
#define MATRIZ_H
#include <GL/gl.h>

class Vector;

enum matrix_type {
	NORMAL_MATRIX = 0,
	IDENTITY_MATRIX,
};

class Matrix{
	public:
		Matrix();
		Matrix(const unsigned int&, const unsigned int&, const unsigned int & = NORMAL_MATRIX);
		Matrix(const Matrix&);
		~Matrix();

		unsigned int getRow() const;
		unsigned int getColumn() const;

		void print() const;
		void print2() const;
		Matrix transpose() const;
		Matrix diagonalInverse() const;
		Vector toVector(unsigned int = 0) const;
		GLdouble *toGlMatrix() const;

		const double* operator[] (unsigned int) const;
		double* operator[] (unsigned int);

		Matrix operator- () const;
		Matrix& operator= (const Matrix&);

        Matrix operator+(const Matrix&) const;
        Matrix operator-(const Matrix&) const;
        Matrix operator*(const Matrix&) const;
        Vector operator*(const Vector&) const;
        Matrix operator*(double) const;

	private:
		unsigned int row, column;
		double **data;
		double *v;

		void allocMatrix(unsigned int, unsigned int);
};


#endif
